home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 39.6 KB | 1,115 lines | [TEXT/MPS ] |
- ;
- ; File: Script.a
- ;
- ; Contains: Script Manager interfaces
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__SCRIPT__') = 'UNDEFINED' THEN
- __SCRIPT__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- IF &TYPE('__INTLRESOURCES__') = 'UNDEFINED' THEN
- include 'IntlResources.a'
- ENDIF
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
-
- ; Script System constants
- smSystemScript EQU -1 ;designates system script.
- smCurrentScript EQU -2 ;designates current font script.
- smAllScripts EQU -3 ;designates any script
- smRoman EQU 0 ;Roman
- smJapanese EQU 1 ;Japanese
- smTradChinese EQU 2 ;Traditional Chinese
- smKorean EQU 3 ;Korean
- smArabic EQU 4 ;Arabic
- smHebrew EQU 5 ;Hebrew
- smGreek EQU 6 ;Greek
- smCyrillic EQU 7 ;Cyrillic
- smRSymbol EQU 8 ;Right-left symbol
- smDevanagari EQU 9 ;Devanagari
- smGurmukhi EQU 10 ;Gurmukhi
- smGujarati EQU 11 ;Gujarati
- smOriya EQU 12 ;Oriya
- smBengali EQU 13 ;Bengali
- smTamil EQU 14 ;Tamil
- smTelugu EQU 15 ;Telugu
- smKannada EQU 16 ;Kannada/Kanarese
- smMalayalam EQU 17 ;Malayalam
-
- smSinhalese EQU 18 ;Sinhalese
- smBurmese EQU 19 ;Burmese
- smKhmer EQU 20 ;Khmer/Cambodian
- smThai EQU 21 ;Thai
- smLaotian EQU 22 ;Laotian
- smGeorgian EQU 23 ;Georgian
- smArmenian EQU 24 ;Armenian
- smSimpChinese EQU 25 ;Simplified Chinese
- smTibetan EQU 26 ;Tibetan
- smMongolian EQU 27 ;Mongolian
- smGeez EQU 28 ;Geez/Ethiopic
- smEthiopic EQU 28 ;Synonym for smGeez
- smEastEurRoman EQU 29 ;Synonym for smSlavic
- smCentralEuroRoman EQU 29 ; another synonym
- smVietnamese EQU 30 ;Vietnamese
- smExtArabic EQU 31 ;extended Arabic
- smUninterp EQU 32 ;uninterpreted symbols, e.g. palette symbols
- smKlingon EQU 32 ;Klingon
- ;Obsolete names for script systems (kept for backward compatibility)
- smChinese EQU 2 ;(use smTradChinese or smSimpChinese)
- smRussian EQU 7 ;(old name for smCyrillic)
- ; smMaldivian = 25; (no more smMaldivian!)
- smAmharic EQU 28 ;(old name for smGeez)
- smSlavic EQU 29 ;(old name for smEastEurRoman)
-
- smSindhi EQU 31 ;(old name for smExtArabic)
- ; Language Codes
- langEnglish EQU 0 ; smRoman script
- langFrench EQU 1 ; smRoman script
- langGerman EQU 2 ; smRoman script
- langItalian EQU 3 ; smRoman script
- langDutch EQU 4 ; smRoman script
- langSwedish EQU 5 ; smRoman script
- langSpanish EQU 6 ; smRoman script
- langDanish EQU 7 ; smRoman script
- langPortuguese EQU 8 ; smRoman script
- langNorwegian EQU 9 ; smRoman script
- langHebrew EQU 10 ; smHebrew script
- langJapanese EQU 11 ; smJapanese script
- langArabic EQU 12 ; smArabic script
- langFinnish EQU 13 ; smRoman script
- langGreek EQU 14 ; should be smGreek script; current systems actually use smRoman (11/95)
- langIcelandic EQU 15 ; variant smRoman script
- langMaltese EQU 16 ; variant smRoman script
- langTurkish EQU 17 ; variant smRoman script
- langCroatian EQU 18 ; Serbo-Croatian in variant Roman script
- langTradChinese EQU 19 ; Chinese in traditional characters
-
- langUrdu EQU 20 ; smArabic script
- langHindi EQU 21 ; smDevanagari script
- langThai EQU 22 ; smThai script
- langKorean EQU 23 ; smKorean script
- langLithuanian EQU 24 ; smCentralEuroRoman script
- langPolish EQU 25 ; smCentralEuroRoman script
- langHungarian EQU 26 ; smCentralEuroRoman script
- langEstonian EQU 27 ; smCentralEuroRoman script
- langLettish EQU 28 ; smCentralEuroRoman script
- langLatvian EQU 28 ; Synonym for langLettish
- langSaamisk EQU 29 ; lang. of the Sami/Lapp people of Scand. (11/95, no current script supports this)
- langFaeroese EQU 30 ; smRoman script
- langFarsi EQU 31 ; smArabic script
- langPersian EQU 31 ; Synonym for langFarsi
- langRussian EQU 32 ; smCyrillic script
- langSimpChinese EQU 33 ; Chinese in simplified characters
- langFlemish EQU 34 ; smRoman script
- langIrish EQU 35 ; smRoman script
- langAlbanian EQU 36 ; smRoman script
-
- langRomanian EQU 37 ; variant smRoman script (11/95) <22>
- langCzech EQU 38 ; smCentralEuroRoman script
- langSlovak EQU 39 ; smCentralEuroRoman script
- langSlovenian EQU 40 ; uses Croatian variant of smRoman script (11/95) <22>
- langYiddish EQU 41 ; smHebrew script
- langSerbian EQU 42 ; Serbo-Croatian in smCyrillic script
- langMacedonian EQU 43 ; smCyrillic script
- langBulgarian EQU 44 ; variant smCyrillic script (11/95) <22>
- langUkrainian EQU 45 ; variant smCyrillic script (11/95) <22>
- langByelorussian EQU 46 ; smCyrillic script
- langUzbek EQU 47 ; variant smCyrillic script (11/95) <22>
- langKazakh EQU 48 ; variant smCyrillic script (11/95) <22>
- langAzerbaijani EQU 49 ; Azerbaijani in variant smCyrillic script (11/95) <22>
- langAzerbaijanAr EQU 50 ; Azerbaijani in smArabic script (Iran)
- langArmenian EQU 51 ; smArmenian script
- langGeorgian EQU 52 ; smGeorgian script
- langMoldavian EQU 53 ; smCyrillic script
- langKirghiz EQU 54 ; variant smCyrillic script (11/95) <22>
- langTajiki EQU 55 ; variant smCyrillic script (11/95) <22>
- langTurkmen EQU 56 ; variant smCyrillic script (11/95) <22>
-
- langMongolian EQU 57 ; Mongolian in smMongolian script
- langMongolianCyr EQU 58 ; Mongolian in variant smCyrillic script (11/95) <22>
- langPashto EQU 59 ; smExtArabic script (11/95) <22>
- langKurdish EQU 60 ; smArabic script
- langKashmiri EQU 61 ; smExtArabic script (11/95) <22>
- langSindhi EQU 62 ; smExtArabic script (11/95) <22>
- langTibetan EQU 63 ; smTibetan script
- langNepali EQU 64 ; smDevanagari script
- langSanskrit EQU 65 ; smDevanagari script
- langMarathi EQU 66 ; smDevanagari script
- langBengali EQU 67 ; smBengali script
- langAssamese EQU 68 ; smBengali script
- langGujarati EQU 69 ; smGujarati script
- langPunjabi EQU 70 ; smGurmukhi script
- langOriya EQU 71 ; smOriya script
- langMalayalam EQU 72 ; smMalayalam script
- langKannada EQU 73 ; smKannada script
- langTamil EQU 74 ; smTamil script
- langTelugu EQU 75 ; smTelugu script
- langSinhalese EQU 76 ; smSinhalese script
-
- langBurmese EQU 77 ; smBurmese script
- langKhmer EQU 78 ; smKhmer script
- langLao EQU 79 ; smLaotian script
- langVietnamese EQU 80 ; smVietnamese script
- langIndonesian EQU 81 ; smRoman script
- langTagalog EQU 82 ; smRoman script
- langMalayRoman EQU 83 ; Malay in smRoman script
- langMalayArabic EQU 84 ; Malay in smArabic script
- langAmharic EQU 85 ; smEthiopic script
- langTigrinya EQU 86 ; smEthiopic script
- langGalla EQU 87 ; smEthiopic script
- langOromo EQU 87 ; Synonym for langGalla
- langSomali EQU 88 ; smRoman script
- langSwahili EQU 89 ; smRoman script
- langRuanda EQU 90 ; smRoman script
- langRundi EQU 91 ; smRoman script
- langChewa EQU 92 ; smRoman script
- langMalagasy EQU 93 ; smRoman script
- langEsperanto EQU 94 ; extended Roman script
- langWelsh EQU 128 ; smRoman script
-
- langBasque EQU 129 ; smRoman script
- langCatalan EQU 130 ; smRoman script
- langLatin EQU 131 ; smRoman script
- langQuechua EQU 132 ; smRoman script
- langGuarani EQU 133 ; smRoman script
- langAymara EQU 134 ; smRoman script
- langTatar EQU 135 ; smCyrillic script
- langUighur EQU 136 ; smArabic script
- langDzongkha EQU 137 ; (lang of Bhutan) smTibetan script
- langJavaneseRom EQU 138 ; Javanese in smRoman script
- langSundaneseRom EQU 139 ; Sundanese in smRoman script
- langGalician EQU 140 ; smRoman script
- ; Obsolete names, kept for backward compatibility
- langPortugese EQU 8 ; old misspelled version, kept for compatibility
- langMalta EQU 16 ; old misspelled version, kept for compatibility
- langYugoslavian EQU 18 ; (use langCroatian, langSerbian, etc.)
- langChinese EQU 19 ; (use langTradChinese or langSimpChinese)
- langLapponian EQU 29 ; Synonym for langSaamisk, not correct name
- langLappish EQU 29 ; Synonym for langSaamisk
-
- ; Regional version codes
- verUS EQU 0
- verFrance EQU 1
- verBritain EQU 2
- verGermany EQU 3
- verItaly EQU 4
- verNetherlands EQU 5
- verFrBelgiumLux EQU 6 ; French for Belgium & Luxembourg
- verSweden EQU 7
- verSpain EQU 8
- verDenmark EQU 9
- verPortugal EQU 10
- verFrCanada EQU 11
- verNorway EQU 12
-
- verIsrael EQU 13
- verJapan EQU 14
- verAustralia EQU 15
- verArabic EQU 16 ; synonym for verArabia
- verFinland EQU 17
- verFrSwiss EQU 18 ; French Swiss
- verGrSwiss EQU 19 ; German Swiss
- verGreece EQU 20
- verIceland EQU 21
- verMalta EQU 22
- verCyprus EQU 23
- verTurkey EQU 24
- verYugoCroatian EQU 25 ; Croatian system for Yugoslavia
- verNetherlandsComma EQU 26
- verBelgiumLuxPoint EQU 27
- verCanadaComma EQU 28
- verCanadaPoint EQU 29
- vervariantPortugal EQU 30
- vervariantNorway EQU 31
- vervariantDenmark EQU 32
- verIndiaHindi EQU 33 ; Hindi system for India
- verPakistan EQU 34
- verTurkishModified EQU 35
- verItalianSwiss EQU 36
- verRomania EQU 39
- verGreekAncient EQU 40
- verLithuania EQU 41
- verPoland EQU 42
- verHungary EQU 43
- verEstonia EQU 44
- verLatvia EQU 45
-
- verLapland EQU 46
- verFaeroeIsl EQU 47
- verIran EQU 48
- verRussia EQU 49
- verIreland EQU 50 ; English-language version for Ireland
- verKorea EQU 51
- verChina EQU 52
- verTaiwan EQU 53
- verThailand EQU 54
- verCzech EQU 56
- verSlovak EQU 57
- verGenericFE EQU 58
- verMagyar EQU 59
- verBengali EQU 60
- verByeloRussian EQU 61
- verUkrania EQU 62
- verUkraine EQU 62
- verAlternateGr EQU 64
- verCroatia EQU 68
- verBrazil EQU 71
- verBulgaria EQU 72
- verCatalonia EQU 73
-
- minCountry EQU 0
- maxCountry EQU 73 ; changed from verCroatia when additional enums added
- ; Obsolete region code names, kept for backward compatibility
-
- verBelgiumLux EQU 6 ; (use verFrBelgiumLux instead, less ambiguous)
- verArabia EQU 16
- verYugoslavia EQU 25 ; (use verYugoCroatian instead, less ambiguous)
- verIndia EQU 33 ; (use verIndiaHindi instead, less ambiguous)
- ; Calendar Codes
- calGregorian EQU 0
- calArabicCivil EQU 1
- calArabicLunar EQU 2
- calJapanese EQU 3
- calJewish EQU 4
- calCoptic EQU 5
- calPersian EQU 6 ; Integer Format Codes
- intWestern EQU 0
- intArabic EQU 1
- intRoman EQU 2
- intJapanese EQU 3
- intEuropean EQU 4
- intOutputMask EQU $8000 ; CharByte byte types
- smSingleByte EQU 0
- smFirstByte EQU -1
- smLastByte EQU 1
- smMiddleByte EQU 2 ; CharType field masks
- smcTypeMask EQU $000F
- smcReserved EQU $00F0
-
- smcClassMask EQU $0F00
- smcOrientationMask EQU $1000 ;two-byte script glyph orientation
- smcRightMask EQU $2000
- smcUpperMask EQU $4000
- smcDoubleMask EQU $8000 ; Basic CharType character types
- smCharPunct EQU $0000
- smCharAscii EQU $0001
- smCharEuro EQU $0007
- smCharExtAscii EQU $0007 ; More correct synonym for smCharEuro
- ; Additional CharType character types for script systems
- smCharKatakana EQU $0002 ;Japanese Katakana
- smCharHiragana EQU $0003 ;Japanese Hiragana
- smCharIdeographic EQU $0004 ;Hanzi, Kanji, Hanja
- smCharTwoByteGreek EQU $0005 ;2-byte Greek in Far East systems
- smCharTwoByteRussian EQU $0006 ;2-byte Cyrillic in Far East systems
- smCharBidirect EQU $0008 ;Arabic/Hebrew
- smCharContextualLR EQU $0009 ;Contextual left-right: Thai, Indic scripts
- smCharNonContextualLR EQU $000A ;Non-contextual left-right: Cyrillic, Greek
- smCharHangul EQU $000C ;Korean Hangul
- smCharJamo EQU $000D ;Korean Jamo
- smCharBopomofo EQU $000E ;Chinese Bopomofo
- smCharGanaKana EQU $000F ;Shared for Japanese Hiragana & Katakana
- ; old names for some of above, for backward compatibility
- smCharFISKana EQU $0002 ;Katakana
- smCharFISGana EQU $0003 ;Hiragana
- smCharFISIdeo EQU $0004 ;Hanzi, Kanji, Hanja
-
- smCharFISGreek EQU $0005 ;2-byte Greek in Far East systems
- smCharFISRussian EQU $0006 ;2-byte Cyrillic in Far East systems
- ; CharType classes for punctuation (smCharPunct)
- smPunctNormal EQU $0000
- smPunctNumber EQU $0100
- smPunctSymbol EQU $0200
- smPunctBlank EQU $0300 ; Additional CharType classes for punctuation in two-byte systems
- smPunctRepeat EQU $0400 ; repeat marker
- smPunctGraphic EQU $0500 ; line graphics
- ; CharType Katakana and Hiragana classes for two-byte systems
- smKanaSmall EQU $0100 ;small kana character
- smKanaHardOK EQU $0200 ;can have dakuten
- smKanaSoftOK EQU $0300 ;can have dakuten or han-dakuten
- ; CharType Ideographic classes for two-byte systems
- smIdeographicLevel1 EQU $0000 ;level 1 char
- smIdeographicLevel2 EQU $0100 ;level 2 char
- smIdeographicUser EQU $0200 ;user char
- ; old names for above, for backward compatibility
- smFISClassLvl1 EQU $0000 ;level 1 char
- smFISClassLvl2 EQU $0100 ;level 2 char
- smFISClassUser EQU $0200 ;user char
- ; CharType Jamo classes for Korean systems
- smJamoJaeum EQU $0000 ;simple consonant char
- smJamoBogJaeum EQU $0100 ;complex consonant char
- smJamoMoeum EQU $0200 ;simple vowel char
-
- smJamoBogMoeum EQU $0300 ;complex vowel char
- ; CharType glyph orientation for two-byte systems
- smCharHorizontal EQU $0000 ; horizontal character form, or for both
- smCharVertical EQU $1000 ; vertical character form
- ; CharType directions
- smCharLeft EQU $0000
- smCharRight EQU $2000 ; CharType case modifers
- smCharLower EQU $0000
- smCharUpper EQU $4000 ; CharType character size modifiers (1 or multiple bytes).
- smChar1byte EQU $0000
- smChar2byte EQU $8000 ; TransliterateText target types for Roman
- smTransAscii EQU 0 ;convert to ASCII
- smTransNative EQU 1 ;convert to font script
- smTransCase EQU $FE ;convert case for all text
- smTransSystem EQU $FF ;convert to system script
- ; TransliterateText target types for two-byte scripts
- smTransAscii1 EQU 2 ;1-byte Roman
- smTransAscii2 EQU 3 ;2-byte Roman
- smTransKana1 EQU 4 ;1-byte Japanese Katakana
- smTransKana2 EQU 5 ;2-byte Japanese Katakana
-
- smTransGana2 EQU 7 ;2-byte Japanese Hiragana (no 1-byte Hiragana)
- smTransHangul2 EQU 8 ;2-byte Korean Hangul
- smTransJamo2 EQU 9 ;2-byte Korean Jamo
- smTransBopomofo2 EQU 10 ;2-byte Chinese Bopomofo
- ; TransliterateText target modifiers
- smTransLower EQU $4000 ;target becomes lowercase
- smTransUpper EQU $8000 ;target becomes uppercase
- ; TransliterateText resource format numbers
- smTransRuleBaseFormat EQU 1 ;Rule based trsl resource format
- smTransHangulFormat EQU 2 ;Table based Hangul trsl resource format
- ; TransliterateText property flags
- smTransPreDoubleByting EQU 1 ;Convert all text to double byte before transliteration
- smTransPreLowerCasing EQU 2 ;Convert all text to lower case before transliteration
- ; TransliterateText source mask - general
- smMaskAll EQU $FFFFFFFF ;Convert all text
- ; TransliterateText source masks
- smMaskAscii EQU $00000001 ;2^smTransAscii
- smMaskNative EQU $00000002 ;2^smTransNative
- ; TransliterateText source masks for two-byte scripts
- smMaskAscii1 EQU $00000004 ;2^smTransAscii1
- smMaskAscii2 EQU $00000008 ;2^smTransAscii2
- smMaskKana1 EQU $00000010 ;2^smTransKana1
- smMaskKana2 EQU $00000020 ;2^smTransKana2
- smMaskGana2 EQU $00000080 ;2^smTransGana2
- smMaskHangul2 EQU $00000100 ;2^smTransHangul2
- smMaskJamo2 EQU $00000200 ;2^smTransJamo2
- smMaskBopomofo2 EQU $00000400 ;2^smTransBopomofo2
-
- ; Result values from GetScriptManagerVariable and SetScriptManagerVariable calls.
- smNotInstalled EQU 0 ;routine not available in script
- smBadVerb EQU -1 ;Bad verb passed to a routine
- smBadScript EQU -2 ;Bad script code passed to a routine
-
- ; Values for script redraw flag.
- smRedrawChar EQU 0 ;Redraw character only
- smRedrawWord EQU 1 ;Redraw entire word (2-byte systems)
- smRedrawLine EQU -1 ;Redraw entire line (bidirectional systems)
- ; GetScriptManagerVariable and SetScriptManagerVariable verbs
- smVersion EQU 0 ;Script Manager version number
- smMunged EQU 2 ;Globals change count
- smEnabled EQU 4 ;Count of enabled scripts, incl Roman
- smBidirect EQU 6 ;At least one bidirectional script
- smFontForce EQU 8 ;Force font flag
- smIntlForce EQU 10 ;Force intl flag
- smForced EQU 12 ;Script was forced to system script
- smDefault EQU 14 ;Script was defaulted to Roman script
- smPrint EQU 16 ;Printer action routine
- smSysScript EQU 18 ;System script
- smLastScript EQU 20 ;Last keyboard script
- smKeyScript EQU 22 ;Keyboard script
- smSysRef EQU 24 ;System folder refNum
- smKeyCache EQU 26 ;obsolete
- smKeySwap EQU 28 ;Swapping table handle
- smGenFlags EQU 30 ;General flags long
- smOverride EQU 32 ;Script override flags
-
- smCharPortion EQU 34 ;Ch vs SpExtra proportion
- ; New for System 7.0:
- smDoubleByte EQU 36 ;Flag for double-byte script installed
- smKCHRCache EQU 38 ;Returns pointer to KCHR cache
- smRegionCode EQU 40 ;Returns current region code (verXxx)
- smKeyDisableState EQU 42 ;Returns current keyboard disable state
- ; GetScriptVariable and SetScriptVariable verbs.
- ; Note: Verbs private to script systems are negative, while
- ; those general across script systems are non-negative.
- smScriptVersion EQU 0 ;Script software version
- smScriptMunged EQU 2 ;Script entry changed count
- smScriptEnabled EQU 4 ;Script enabled flag
- smScriptRight EQU 6 ;Right to left flag
- smScriptJust EQU 8 ;Justification flag
- smScriptRedraw EQU 10 ;Word redraw flag
- smScriptSysFond EQU 12 ;Preferred system font
- smScriptAppFond EQU 14 ;Preferred Application font
- smScriptBundle EQU 16 ;Beginning of itlb verbs
- smScriptNumber EQU 16 ;Script itl0 id
- smScriptDate EQU 18 ;Script itl1 id
- smScriptSort EQU 20 ;Script itl2 id
- smScriptFlags EQU 22 ;flags word
- smScriptToken EQU 24 ;Script itl4 id
- smScriptEncoding EQU 26 ;id of optional itl5, if present
- smScriptLang EQU 28 ;Current language for script
-
- smScriptNumDate EQU 30 ;Script Number/Date formats.
- smScriptKeys EQU 32 ;Script KCHR id
- smScriptIcon EQU 34 ;ID # of SICN or kcs#/kcs4/kcs8 suite
- smScriptPrint EQU 36 ;Script printer action routine
- smScriptTrap EQU 38 ;Trap entry pointer
- smScriptCreator EQU 40 ;Script file creator
- smScriptFile EQU 42 ;Script file name
- smScriptName EQU 44 ;Script name
- ; There is a hole here for old Kanji private verbs 46-76
- ; New for System 7.0:
- smScriptMonoFondSize EQU 78 ;default monospace FOND (hi) & size (lo)
- smScriptPrefFondSize EQU 80 ;preferred FOND (hi) & size (lo)
- smScriptSmallFondSize EQU 82 ;default small FOND (hi) & size (lo)
- smScriptSysFondSize EQU 84 ;default system FOND (hi) & size (lo)
- smScriptAppFondSize EQU 86 ;default app FOND (hi) & size (lo)
- smScriptHelpFondSize EQU 88 ;default Help Mgr FOND (hi) & size (lo)
- smScriptValidStyles EQU 90 ;mask of valid styles for script
- smScriptAliasStyle EQU 92 ;style (set) to use for aliases
- ; Special script code values for International Utilities
- iuSystemScript EQU -1 ; <obsolete> system script
- iuCurrentScript EQU -2 ; <obsolete> current script (for font of grafPort)
- ; Negative verbs for KeyScript
- smKeyNextScript EQU -1 ; Switch to next available script
- smKeySysScript EQU -2 ; Switch to the system script
- smKeySwapScript EQU -3 ; Switch to previously-used script
- ; New for System 7.0:
- smKeyNextKybd EQU -4 ; Switch to next keyboard in current keyscript
-
- smKeySwapKybd EQU -5 ; Switch to previously-used keyboard in current keyscript
- smKeyDisableKybds EQU -6 ; Disable keyboards not in system or Roman script
- smKeyEnableKybds EQU -7 ; Re-enable keyboards for all enabled scripts
- smKeyToggleInline EQU -8 ; Toggle inline input for current keyscript
- smKeyToggleDirection EQU -9 ; Toggle default line direction (TESysJust)
- smKeyNextInputMethod EQU -10 ; Switch to next input method in current keyscript
- smKeySwapInputMethod EQU -11 ; Switch to last-used input method in current keyscript
- smKeyDisableKybdSwitch EQU -12 ; Disable switching from the current keyboard
- smKeySetDirLeftRight EQU -15 ; Set default line dir to left-right, align left
- smKeySetDirRightLeft EQU -16 ; Set default line dir to right-left, align right
- smKeyRoman EQU -17 ; Set keyscript to Roman. Does nothing if Roman-only
- ; system, unlike KeyScript(smRoman) which forces
- ; an update to current default Roman keyboard
- ; Bits in the smScriptFlags word
- ; (bits above 8 are non-static)
- smsfIntellCP EQU 0 ;Script has intelligent cut & paste
- smsfSingByte EQU 1 ;Script has only single bytes
- smsfNatCase EQU 2 ;Native chars have upper & lower case
- smsfContext EQU 3 ;Script is contextual
- smsfNoForceFont EQU 4 ;Script will not force characters
- smsfB0Digits EQU 5 ;Script has alternate digits at B0-B9
- smsfAutoInit EQU 6 ;Auto initialize the script
- smsfUnivExt EQU 7 ;Script is handled by universal extension
- smsfSynchUnstyledTE EQU 8 ;Script synchronizes for unstyled TE
- smsfForms EQU 13 ;Uses contextual forms for letters
- smsfLigatures EQU 14 ;Uses contextual ligatures
- smsfReverse EQU 15 ;Reverses native text, right-left
- ; Bits in the smGenFlags long.
- ; First (high-order) byte is set from itlc flags byte.
- smfShowIcon EQU 31 ;Show icon even if only one script
- smfDualCaret EQU 30 ;Use dual caret for mixed direction text
- smfNameTagEnab EQU 29 ;Reserved for internal use
- smfUseAssocFontInfo EQU 28 ;Use the associated font info for FontMetrics calls <48>
-
- ; Roman script constants
- ; The following are here for backward compatibility, but should not be used.
- ; This information should be obtained using GetScript.
- romanSysFond EQU $3FFF ;system font id number
- romanAppFond EQU 3 ;application font id number
- romanFlags EQU $0007 ;roman settings
- ; Script Manager font equates.
- smFondStart EQU $4000 ;start from 16K
- smFondEnd EQU $C000 ;past end of range at 48K
- ; Miscellaneous font equates.
- smUprHalfCharSet EQU $80 ;first char code in top half of std char set
- ; Character Set Extensions
- diaeresisUprY EQU $D9
- fraction EQU $DA
- intlCurrency EQU $DB
- leftSingGuillemet EQU $DC
- rightSingGuillemet EQU $DD
- fiLigature EQU $DE
- flLigature EQU $DF
- dblDagger EQU $E0
- centeredDot EQU $E1
- baseSingQuote EQU $E2
- baseDblQuote EQU $E3
- perThousand EQU $E4
- circumflexUprA EQU $E5
-
- circumflexUprE EQU $E6
- acuteUprA EQU $E7
- diaeresisUprE EQU $E8
- graveUprE EQU $E9
- acuteUprI EQU $EA
- circumflexUprI EQU $EB
- diaeresisUprI EQU $EC
- graveUprI EQU $ED
- acuteUprO EQU $EE
- circumflexUprO EQU $EF
- appleLogo EQU $F0
- graveUprO EQU $F1
- acuteUprU EQU $F2
- circumflexUprU EQU $F3
- graveUprU EQU $F4
- dotlessLwrI EQU $F5
- circumflex EQU $F6
- tilde EQU $F7
- macron EQU $F8
- breveMark EQU $F9
-
- overDot EQU $FA
- ringMark EQU $FB
- cedilla EQU $FC
- doubleAcute EQU $FD
- ogonek EQU $FE
- hachek EQU $FF ; TokenType values
- tokenIntl EQU 4 ;the itl resource number of the tokenizer
- tokenEmpty EQU -1 ;used internally as an empty flag
-
- tokenUnknown EQU 0 ;chars that do not match a defined token type
- tokenWhite EQU 1 ;white space
- tokenLeftLit EQU 2 ;literal begin
- tokenRightLit EQU 3 ;literal end
- tokenAlpha EQU 4 ;alphabetic
- tokenNumeric EQU 5 ;numeric
- tokenNewLine EQU 6 ;new line
- tokenLeftComment EQU 7 ;open comment
- tokenRightComment EQU 8 ;close comment
- tokenLiteral EQU 9 ;literal
- tokenEscape EQU 10 ;character escape (e.g. '\' in "\n", "\t")
- tokenAltNum EQU 11 ;alternate number (e.g. $B0-B9 in Arabic,Hebrew)
- tokenRealNum EQU 12 ;real number
- tokenAltReal EQU 13 ;alternate real number
- tokenReserve1 EQU 14 ;reserved
- tokenReserve2 EQU 15 ;reserved
- tokenLeftParen EQU 16 ;open parenthesis
- tokenRightParen EQU 17 ;close parenthesis
- tokenLeftBracket EQU 18 ;open square bracket
- tokenRightBracket EQU 19 ;close square bracket
-
- tokenLeftCurly EQU 20 ;open curly bracket
- tokenRightCurly EQU 21 ;close curly bracket
- tokenLeftEnclose EQU 22 ;open guillemet
- tokenRightEnclose EQU 23 ;close guillemet
- tokenPlus EQU 24
- tokenMinus EQU 25
- tokenAsterisk EQU 26 ;times/multiply
- tokenDivide EQU 27
- tokenPlusMinus EQU 28 ;plus or minus symbol
- tokenSlash EQU 29
- tokenBackSlash EQU 30
- tokenLess EQU 31 ;less than symbol
- tokenGreat EQU 32 ;greater than symbol
- tokenEqual EQU 33
- tokenLessEqual2 EQU 34 ;less than or equal, 2 characters (e.g. <=)
- tokenLessEqual1 EQU 35 ;less than or equal, 1 character
- tokenGreatEqual2 EQU 36 ;greater than or equal, 2 characters (e.g. >=)
- tokenGreatEqual1 EQU 37 ;greater than or equal, 1 character
- token2Equal EQU 38 ;double equal (e.g. ==)
- tokenColonEqual EQU 39 ;colon equal
-
- tokenNotEqual EQU 40 ;not equal, 1 character
- tokenLessGreat EQU 41 ;less/greater, Pascal not equal (e.g. <>)
- tokenExclamEqual EQU 42 ;exclamation equal, C not equal (e.g. !=)
- tokenExclam EQU 43 ;exclamation point
- tokenTilde EQU 44 ;centered tilde
- tokenComma EQU 45
- tokenPeriod EQU 46
- tokenLeft2Quote EQU 47 ;open double quote
- tokenRight2Quote EQU 48 ;close double quote
- tokenLeft1Quote EQU 49 ;open single quote
- tokenRight1Quote EQU 50 ;close single quote
- token2Quote EQU 51 ;double quote
- token1Quote EQU 52 ;single quote
- tokenSemicolon EQU 53
- tokenPercent EQU 54
- tokenCaret EQU 55
- tokenUnderline EQU 56
- tokenAmpersand EQU 57
- tokenAtSign EQU 58
- tokenBar EQU 59 ;vertical bar
-
- tokenQuestion EQU 60
- tokenPi EQU 61 ;lower-case pi
- tokenRoot EQU 62 ;square root symbol
- tokenSigma EQU 63 ;capital sigma
- tokenIntegral EQU 64 ;integral sign
- tokenMicro EQU 65
- tokenCapPi EQU 66 ;capital pi
- tokenInfinity EQU 67
- tokenColon EQU 68
- tokenHash EQU 69 ;e.g. #
- tokenDollar EQU 70
- tokenNoBreakSpace EQU 71 ;non-breaking space
- tokenFraction EQU 72
- tokenIntlCurrency EQU 73
- tokenLeftSingGuillemet EQU 74
- tokenRightSingGuillemet EQU 75
- tokenPerThousand EQU 76
- tokenEllipsis EQU 77
- tokenCenterDot EQU 78
- tokenNil EQU 127
-
- delimPad EQU -2 ; obsolete, misspelled token names kept for backward compatibility
- tokenTilda EQU 44
- tokenCarat EQU 55
-
- ; Table selectors for GetItlTable
- smWordSelectTable EQU 0 ; get word select break table from 'itl2'
- smWordWrapTable EQU 1 ; get word wrap break table from 'itl2'
- smNumberPartsTable EQU 2 ; get default number parts table from 'itl4'
- smUnTokenTable EQU 3 ; get unToken table from 'itl4'
- smWhiteSpaceList EQU 4 ; get white space list from 'itl4'
- iuWordSelectTable EQU 0 ; <obsolete> get word select break table from 'itl2'
- iuWordWrapTable EQU 1 ; <obsolete> get word wrap break table from 'itl2'
- iuNumberPartsTable EQU 2 ; <obsolete> get default number parts table from 'itl4'
- iuUnTokenTable EQU 3 ; <obsolete> get unToken table from 'itl4'
- iuWhiteSpaceList EQU 4 ; <obsolete> get white space list from 'itl4'
- ; end of stuff moved from Packages.h
-
- tokenOK EQU 0 ; TokenResults
- tokenOverflow EQU 1 ; TokenResults
- stringOverflow EQU 2 ; TokenResults
- badDelim EQU 3 ; TokenResults
- badEnding EQU 4 ; TokenResults
- crash EQU 5 ; TokenResults
- ; typedef SInt8 TokenResults
-
- CharByteTable RECORD 0
- elements ds.b 256
- sizeof EQU * ; size: $100 (256)
- ENDR
-
-
- ; typedef short TokenType
-
- DelimType RECORD 0
- elements ds.w 2
- sizeof EQU * ; size: $4 (4)
- ENDR
-
-
- CommentType RECORD 0
- elements ds.w 4
- sizeof EQU * ; size: $8 (8)
- ENDR
-
-
- TokenRec RECORD 0
- theToken ds.w 1 ; offset: $0 (0)
- position ds.l 1 ; offset: $2 (2) ; pointer into original source
- length ds.l 1 ; offset: $6 (6) ; length of text in original source
- stringPosition ds.l 1 ; offset: $A (10) ; Pascal/C string copy of identifier
- sizeof EQU * ; size: $E (14)
- ENDR
- ; typedef struct TokenRec * TokenRecPtr
-
- TokenBlock RECORD 0
- source ds.l 1 ; offset: $0 (0) ; pointer to stream of characters
- sourceLength ds.l 1 ; offset: $4 (4) ; length of source stream
- tokenList ds.l 1 ; offset: $8 (8) ; pointer to array of tokens
- tokenLength ds.l 1 ; offset: $C (12) ; maximum length of TokenList
- tokenCount ds.l 1 ; offset: $10 (16) ; number tokens generated by tokenizer
- stringList ds.l 1 ; offset: $14 (20) ; pointer to stream of identifiers
- stringLength ds.l 1 ; offset: $18 (24) ; length of string list
- stringCount ds.l 1 ; offset: $1C (28) ; number of bytes currently used
- doString ds.b 1 ; offset: $20 (32) ; make strings & put into StringList
- doAppend ds.b 1 ; offset: $21 (33) ; append to TokenList rather than replace
- doAlphanumeric ds.b 1 ; offset: $22 (34) ; identifiers may include numeric
- doNest ds.b 1 ; offset: $23 (35) ; do comments nest?
- leftDelims ds.w 2 ; offset: $24 (36)
- rightDelims ds.w 2 ; offset: $28 (40)
- leftComment ds.w 4 ; offset: $2C (44)
- rightComment ds.w 4 ; offset: $34 (52)
- escapeCode ds.w 1 ; offset: $3C (60) ; escape symbol code
- decimalCode ds.w 1 ; offset: $3E (62)
- itlResource ds.l 1 ; offset: $40 (64) ; handle to itl4 resource of current script
- reserved ds.l 8 ; offset: $44 (68) ; must be zero!
- sizeof EQU * ; size: $64 (100)
- ENDR
- ; typedef struct TokenBlock * TokenBlockPtr
-
- IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
- ;
- ; pascal short GetSysDirection(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetSysDirection &dest=(sp)
- move.w $0BAC,&dest
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetSysDirection
- ENDIF
-
- ;
- ; pascal void SetSysDirection(short value)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetSysDirection &src=(sp)+
- move.w &src,$0BAC
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetSysDirection
- ENDIF
-
- ;
- ; pascal short FontScript(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _FontScript
- move.l #$82000000,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION FontScript
- ENDIF
-
- ;
- ; pascal short IntlScript(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _IntlScript
- move.l #$82000002,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IntlScript
- ENDIF
-
- ;
- ; pascal void KeyScript(short code)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _KeyScript
- move.l #$80020004,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION KeyScript
- ENDIF
-
- ;
- ; pascal Boolean IsCmdChar(const EventRecord *event, short test)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _IsCmdChar
- move.l #$8206FFD0,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IsCmdChar
- ENDIF
-
- ;
- ; pascal short FontToScript(short fontNumber)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _FontToScript
- move.l #$82020006,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION FontToScript
- ENDIF
-
- ;
- ; pascal long GetScriptManagerVariable(short selector)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetScriptManagerVariable
- move.l #$84020008,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetScriptManagerVariable
- ENDIF
-
- ;
- ; pascal OSErr SetScriptManagerVariable(short selector, long param)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetScriptManagerVariable
- move.l #$8206000A,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetScriptManagerVariable
- ENDIF
-
- ;
- ; pascal long GetScriptVariable(short script, short selector)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetScriptVariable
- move.l #$8404000C,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetScriptVariable
- ENDIF
-
- ;
- ; pascal OSErr SetScriptVariable(short script, short selector, long param)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetScriptVariable
- move.l #$8208000E,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetScriptVariable
- ENDIF
-
- ;
- ; pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CharacterByteType
- move.l #$C2060010,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CharacterByteType
- ENDIF
-
- ;
- ; pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CharacterType
- move.l #$C2060012,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CharacterType
- ENDIF
-
- ;
- ; pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _TransliterateText
- move.l #$C20E0018,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION TransliterateText
- ENDIF
-
- ;
- ; pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _FillParseTable
- move.l #$C2040022,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION FillParseTable
- ENDIF
-
- ;
- ; pascal Handle GetIntlResource(short theID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetIntlResource
- move.w #$0006,-(sp)
- dc.w $A9ED
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetIntlResource
- ENDIF
-
- ;
- ; pascal void ClearIntlResourceCache(void )
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ClearIntlResourceCache
- move.w #$0018,-(sp)
- dc.w $A9ED
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ClearIntlResourceCache
- ENDIF
-
- ;
- ; pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Handle *itlHandle, long *offset, long *length)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetIntlResourceTable
- move.w #$0024,-(sp)
- dc.w $A9ED
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetIntlResourceTable
- ENDIF
-
- ;
- ; pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetScriptUtilityAddress
- move.l #$C4040038,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetScriptUtilityAddress
- ENDIF
-
- ;
- ; pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetScriptUtilityAddress
- move.l #$C008003A,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetScriptUtilityAddress
- ENDIF
-
- ;
- ; pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GetScriptQDPatchAddress
- move.l #$C406003C,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GetScriptQDPatchAddress
- ENDIF
-
- ;
- ; pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetScriptQDPatchAddress
- move.l #$C00A003E,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetScriptQDPatchAddress
- ENDIF
-
- ;
- ; pascal void SetIntlResource(short refNum, short theID, Handle intlHandle)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _SetIntlResource
- move.w #$0008,-(sp)
- dc.w $A9ED
- EndM
- ELSE
- IMPORT_CFM_FUNCTION SetIntlResource
- ENDIF
-
- ENDIF
- IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
- ;
- ; pascal short CharByte(Ptr textBuf, short textOffset)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CharByte
- move.l #$82060010,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CharByte
- ENDIF
-
- ;
- ; pascal short CharType(Ptr textBuf, short textOffset)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CharType
- move.l #$82060012,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CharType
- ENDIF
-
- ;
- ; pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _Transliterate
- move.l #$820E0018,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION Transliterate
- ENDIF
-
- ;
- ; pascal Boolean ParseTable(CharByteTable table)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ParseTable
- move.l #$82040022,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ParseTable
- ENDIF
-
- ;
- ; pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _IntlTokenize
- move.l #$8204FFFA,-(sp)
- dc.w $A8B5
- EndM
- ELSE
- IMPORT_CFM_FUNCTION IntlTokenize
- ENDIF
-
- ENDIF
- IF OLDROUTINENAMES THEN
- ELSE
- ENDIF
- ENDIF ; __SCRIPT__
-
-